package net.fruit.mq.client.consumer.spring;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

import net.fruit.mq.client.MQClient;

public class ConsumerFactory implements ApplicationContextAware {
    ApplicationContext applicationContext;
    
    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        this.applicationContext = applicationContext;
    }
    
    public void start() {
        MQClient.startConsumer();
    }

    public void shutdown() {
        MQClient.shutdownConsumer();
    }
}
